import { createApp } from "vue";
// 做了按需引入，就不需要下面的这种全局引入了
// import ElementPlus from "element-plus";
// import "element-plus/dist/index.css";

// * as xxx => 引入 模块中所有的具名导出，将其组装到 xxx 的对象中
// 引入所有的图标
import * as ElementPlusIconsVue from "@element-plus/icons-vue";

//Element Plus 提供了全局配置国际化的配置
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'

import App from "./App.vue";
import router from "./router";
import store from "./store";

// 引入全局初始化样式
import "normalize.css";
// ElMessage 消息，需要手动引入样式
import "element-plus/es/components/message/style/css";
// 引入自己编写的全局样式
import "@/styles/base.scss";

const app = createApp(App);

// app.use(ElementPlus);
app.use(router);
app.use(store);


// 将所有的图标都注册成全局组件
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

app.use(ElementPlus, {
  locale: zhCn,
})

app.config.globalProperties.$abc = "123";

app.mount("#app");

//console.log(import.meta.env);
